1. Field of the Invention
The present invention relates in general to a method to detect the movement of an image sensor. In particular, the present invention relates to a method for detecting movement of an image sensor by comparing the images captured by the image sensor at different places. After finding the matching images, the moving direction of the image sensor is determined, then the image captured region of the next image is determined according to the moving direction of the image sensor to determine the movement of the image sensor successfully.
2. Description of the Related Art
Normally, the prior arts use block matching to determine the movement of an image sensor. Ideally, this method can correctly find a matching frame block generated from matching function, mean squared error (MSE) or mean absolute difference (MAD), then use the matching frame blocks to calculate the movement of the image sensor.
FIG. 1A and FIG. 1B show the conventional method of determining the movement of an image sensor by block matching. The frame 10A is the image captured by the image sensor in a first location, and the frame 10B is the image captured by the image sensor when the image sensor moves to a second location. Here, the size of the frame captured by the image sensor is 6×6 units, and the frame 10A is divided into 9 parts by 2×2 units. Then, the frame 10B is searched to find a frame block matching the frame block 12A in frame 10A.
However, there are actually many sources of noise, not only from image and process variation, but also from the environment of the image sensor such as temperature and illumination variation. Therefore, the matching result obtains a frame block 12B having a gray scale close to the frame block 12A, wherein the value of the matching function is the minimum.
Since the image sensor has limited size and frame rate (frame per second), and for cost issues, the smaller sensor array always has lower cost for a chip. Assuming the sensor array size is M×M, the central block is N×N, image sensor pixel size is PN×PN, and the frame rate is FN frame, then the maximum horizontal and vertical detectable range of the image sensor is ±(M−N)/2 or the maximum horizontal and vertical velocity of image sensor is PN×[±(M−N)/2]×FN. Using central block as a template can make the horizontal and vertical detectable range or velocity balance. It is possible that the image sensor may move too fast to make the successive two images have no overlapped image, that is the movement is beyond the movable range or the velocity of the image sensor is faster than the maximum velocity. This will make this motion detection method generate a wrong displacement.
FIG. 2A and FIG. 2B show a situation when the conventional motion detecting method generates the wrong displacement.
The frame 20A is the image captured by the image sensor in a first location, and the frame 20B is the image captured by the image sensor when the image sensor moves to a second location. Then, the frame 20B is searched to find a frame block matching the frame block 22A in frame 20A. If the moving velocity of the image sensor surpasses in the hardware capacity, there is no frame block in the frame 20B matching the frame block 22A, therefore, the conventional motion detecting method fails.